package com.leyou.mall.data.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xhh
 * @since 2022-07-04
 */
@ToString
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="MallGoods对象", description="")
public  class MallGoods implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "品牌id")
    private Integer brandId;

    @ApiModelProperty(value = "编号")
    private String number;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "单位")
    private String unit;

    @ApiModelProperty(value = "介绍")
    private String introduce;

    @ApiModelProperty(value = "价格")
    private BigDecimal price;

    @ApiModelProperty(value = "会员价格")
    private BigDecimal memberPrice;

    @ApiModelProperty(value = "积分")
    private Integer integral;

    @ApiModelProperty(value = "成长值")
    private Integer growth;

    @ApiModelProperty(value = "货号")
    private String articleNo;

    @ApiModelProperty(value = "已经购买数量")
    private Integer buyCount;

    @ApiModelProperty(value = "库存")
    private Integer stock;

    @ApiModelProperty(value = "预警库存")
    private Integer stockWarning;

    @ApiModelProperty(value = "每个用户限购数量(0-无限)")
    private Integer quota;

    @ApiModelProperty(value = "物流(1-普通，2-门店自提，3-国外直邮)")
    private Integer logistics;

    @ApiModelProperty(value = "状态(0-未上架 1-已上架)")
    private Boolean state;

    @ApiModelProperty(value = "促销状态(0-未开启 1-已开启)")
    private Boolean promotionState;

    @ApiModelProperty(value = "促销开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date promotionStartTime;

    @ApiModelProperty(value = "促销结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date promotionEndTime;

    @ApiModelProperty(value = "促销价格")
    private BigDecimal promotionPrice;

    @ApiModelProperty(value = "服务保障(1-七天无理由退货，2-包邮，3-包税)")
    private Integer guarantee;

    @ApiModelProperty(value = "添加时间")
      @TableField(fill = FieldFill.INSERT)
    private Date insertTime;

    @ApiModelProperty(value = "修改时间")
      @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifiedTime;

    @ApiModelProperty(value = "删除标记")
    @TableLogic
    @TableField(select = false)
    private Integer deleted;


}
